<div id="ContentMessage">
	<div id="NoteContentMessage">
		<?php echo $get_message_notnull ?>
	</div>
	
	<div id="ErrorContentMessage">
		<?php echo $m_error_msg; ?>		
	</div>
	
</div>		
<form  name='form_main' id="form_main" method="post" action="<?php echo $link_page; ?>" enctype="multipart/form-data">	
<div id="SiteContent_main">			
	
	
	<div id="EditContent">
		<table class="EditStyle01" style="width:100%" >
			<tbody>								
				<tr>
					<td class="key" width="150" align="right">
					<?php echo $lbl_code; ?><?php echo $get_icon_notnull; ?>					</td>
					<td width="400">
						<input style="width:300px;" type="text" width="" name="txt_ccode" value="<?php echo $txt_ccode; ?>">					
					</td>
				</tr>
				
				<tr>
					<td class="key" width="150" align="right">
					<?php echo $lbl_banner_images; ?><?php echo $get_icon_notnull; ?>					</td>
					<td width="400">
						<input style="width:300px;" type="text" width="" name="txt_cbanner_images" value="<?php echo $txt_cbanner_images; ?>">					
					</td>
				</tr>
			<!--<tr>
				  <td class="key" align="right"><?php // echo $lbl_lang; ?></td>				
				  <td ><div style="width:157px;"><?php // echo $gencbo_language_list; ?></div></td>
				  <td width="600" ></td>
			  </tr>-->
				<tr>
					<td align="right" class="key">
						<?php echo 'Hình ảnh'; ?>						</td>
					<td>
						<input name="txt_cthumb_img" type="file" id="txt_cthumb_img" value ="" size="33" />
						<div style="position:absolute; top:128px; left:650px;">
						<?php 
							$url = base_url().'index.php/do_banner_images/delete_image/'.$nid; 
						?>
							<div id="images_div">
							<?php if($txt_cthumb_img !=''): echo '<img width="250" style=" border:solid 2px #999999;"  height="145" src="'.$fr_img.'upload/slide/'.$txt_cthumb_img.'  "/>'?>
							<p style="text-align:center"><a href="#" onclick="javascript:ajax_delete_image();">Delete</a></p>
							<?php endif; ?>
							</div>
						</div>
					</td>
				</tr>
				<tr>
					<td class="key" width="150" align="right">
						<?php echo 'Link'; ?>					</td>
					<td width="400">
						<input style="width:300px;" type="text" name="txt_ctag" value="<?php echo $txt_ctag; ?>" maxlength="4"/>					</td>
				</tr>
				
			
				
				
								<tr>
					<td class="key" width="150" align="right">
						<?php echo $lbl_status; ?>					</td>
					<td width="400"><?php echo $gen_cbo_status;?></td>
				</tr>
								<tr>
					<td class="key" width="150" align="right">
						<?php echo $lbl_index; ?>					</td>
					<td width="400">
						<input style="width:300px;" type="text" name="txt_cindex" value="<?php echo $txt_cindex; ?>" maxlength="4"/>					</td>
				</tr>
				
					<tr>
					<td class="key" width="150" align="right">
						<?php echo 'Note'; ?>					</td>
					<td width="400">
						<textarea name="txt_cnote"  style="width:290px;height:100px;"><?php echo $txt_cnote?></textarea>
	</td>
				</tr>
				
				<tr>
					<td class="key" width="150" align="right">&nbsp;</td>
					<td width="400">
						<input type="button" name="btn_submit" style="width:80px;" value ="<?php echo $btn_update; ?>" 
							onclick ="js_SetSubmitButtonClick(this.form, this.name);" class="button" />
													   
						<input name="btn_cancel" style="width:80px;" type="button" 
							   value = "<?php echo $btn_cancel; ?>"
							   onclick="location.href='<?php echo $link_cancel; ?> '" class="button" />
					</td>
				</tr>			
				
			<tbody>				
		</table>
		<div style="background:#EEEEEE;padding:5px;margin-bottom:50px;">Chú ý: kích thước hình upload: rộng:630px, cao: 250px</div>
	</div>
	<input name="hidden_nid" type="hidden" value = "<?php echo $nid; ?>"  />
	<input name="hidden_event" type="hidden" value = "<?php echo $event; ?>"  />
	<input type="hidden" name="hidden_button_click"  value = "" />	
	<input type="hidden" name="hidden_image_old"  value = "<?php echo $txt_cthumb_img; ?>" />
</div>
</form>

<!-- BAT BUOC CAC FORM NHAP LIEU DEU PHAI DUNG SCRIPT NAY. -->

<script type="text/javascript" >
	document.form_main.txt_nid.focus();

function ajax_delete_image()
	{
		document.form_main.hidden_image_old.value = '';
		pb_display('<?php echo $url ?>','images_div');
	}	

/*-------------------------------------------------------------------------------------
* Tokaban Corp 1509
* Package : TKB PHP SYSTEM CODE
*--------------------------------------------------------------------------------------
* huanlv77 - 1509/06/28.
*--------------------------------------------------------------------------------------
* Ham submit form co su dung su kien hidden de truyen bien flag dieu khien.
* Nhiem vu gan gia tri cho bien hidden dieu khien nut nhan submit cua form.
* Dung de controller nhan biet nut submit nao duoc nhan tren giao dien de xu ly tren server script.
* Ham nay duoc dung chung cho toan bo ung dung.
* Nen xay dung thanh chuan de tai su dung cho nhung du an khac.
*--------------------------------------------------------------------------------------*/
function js_SetSubmitButtonClick(obj_form, btn_name) 
	{
		obj_form.hidden_button_click.value = btn_name;
		obj_form.submit();		
	}	

</script>